package com.dcy.znoa.domain.conference;

import java.util.Date;
import java.util.HashMap;
import java.util.Map;

import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 会议室
 * @author chenjie
 *
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
@TableName("conference_room")
public class ConferenceRoom {
	
	@TableId(type = IdType.AUTO, value = "confer_id")
    Long conferId;
	
	@TableField("confer_type")
	Integer conferType;  //会议室类型：1 普通 2 多媒体 3 圆桌  4 视频  5其它
	
	@TableField("confer_name")
    String conferName;

	@TableField("status")
	Integer status;    //1 空闲 2  会议中  3 维护中
	
	@TableField("confer_number")
    String conferNumber; //会议室编号
	
	@TableField("confer_capacity")
	Integer conferCapacity; //容纳人数
	
	@TableField("confer_address")
    String conferAddress; //会议室地址
	
	@TableField("confer_photo")
    String conferPhoto; //会议室照片
	
	@TableField("comp_id")
    Long compId;
    
    @TableField("create_oper_name")
    String createOperName;

    @TableField("create_time")
    Date createTime;

    @TableField("update_oper_name")
    String updateOperName;

    @TableField("update_time")
    Date updateTime;

    @TableField("valid_flag")
    Integer validFlag;

	public static Map<String, Object> toMap(ConferenceRoom conferenceRoom) {
		Map<String, Object> map  = new HashMap<String, Object>();
        map.put("conferId",conferenceRoom.getConferId());
        
        //1 普通 2 多媒体 3 圆桌  4 视频  5其它
        String conferTypeStr = "";
        switch (conferenceRoom.getConferType()) {
		case 1:
			conferTypeStr = "普通";
			break;
		case 2:
			conferTypeStr = "多媒体";
			break;
		case 3:
			conferTypeStr = "圆桌";
			break;
		case 4:
			conferTypeStr = "视频 ";
			break;
		case 5:
			conferTypeStr = "其它";
			break;

		default:
			break;
		}
        map.put("conferType",conferTypeStr);
        map.put("conferName",conferenceRoom.getConferName());
        
        
       //1 空闲  3 维护中
        String statusStr = "";
        switch (conferenceRoom.getStatus()) {
		case 1:
			statusStr = "空闲 ";
			break;
		case 2:
			statusStr = "会议中";
			break;
		case 3:
			statusStr = "维护中";
			break;
		default:
			break;
		}
        map.put("status", statusStr);
        map.put("conferCapacity",conferenceRoom.getConferCapacity());
        map.put("conferAddress",conferenceRoom.getConferAddress());
        
        return  map;
	}

 

}
